package com.tanggh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.tanggh.dao.GenericDao;
import com.tanggh.dao.JobCategoryDao;
import com.tanggh.entity.JobCategory;
import com.tanggh.service.JobCategoryService;

@Service
public class JobCategoryServiceImpl extends GenericServiceImpl<JobCategory> implements JobCategoryService {

	private JobCategoryDao jobCategoryDao;
	
	@Autowired
	@Qualifier("jobCategoryDaoImpl")
	@Override
	protected void setGenericDao(GenericDao<JobCategory> genericDao) {
		this.genericDao = genericDao;
		this.jobCategoryDao = (JobCategoryDao)genericDao;
	}

	/**
	 * 根据JobCategory code值前两位查询
	 * @param code
	 * @return
	 */
	@Override
	public List<JobCategory> getCategoryByCode(String code) {
		return jobCategoryDao.getCategoryByCode(code);
	}

}
